/* Effect of job characteristics on being in a complex echange job */
/* ONLY EMPLOYMENT SPELLS CODED AS COMPLEX */
/* EVERY YEAR OR NON-COMPLEX EVERY YEAR ARE KEPT */

#delimit ;

version 8;
set mem 100m;
 
log using table4, replace text;
 


/*private sector only*/

u psid76_2004_jleo;

egen mean_relational_job=mean(relational), by(jobmatch);

keep if mean_relational_job<=0 | mean_relational_job>=1;




xi: reg relational_job finger ehf sts dcp math numobs educ potexp tenure married collbarg nonwhite 
i.year i.ind1dg
    [aw=iweight], cluster(occ70);
test (sts=0) (finger=0) (ehf=0) (dcp=0) (math=0);

xi: reg relational_job finger ehf sts dcp math numobs educ potexp tenure married collbarg nonwhite 
i.year i.occcat i.ind1dg
    [aw=iweight], cluster(occ70);
test (sts=0) (finger=0) (ehf=0) (dcp=0) (math=0);

xi: dprobit relational_job finger ehf sts dcp math numobs educ potexp tenure married collbarg nonwhite 
i.year i.ind1dg
    [aw=iweight], cluster(occ70);
test (sts=0) (finger=0) (ehf=0) (dcp=0) (math=0);

xi: dprobit relational_job finger ehf sts dcp math numobs educ potexp tenure married collbarg nonwhite 
i.year i.occcat i.ind1dg
    [aw=iweight], cluster(occ70);
test (sts=0) (finger=0) (ehf=0) (dcp=0) (math=0);

xi: areg relational_job finger ehf sts dcp math numobs educ potexp tenure married collbarg nonwhite 
i.year i.ind1dg
    [aw=iweight], cluster(occ70) absorb(id);
test (sts=0) (finger=0) (ehf=0) (dcp=0) (math=0);

xi: areg relational_job finger ehf sts dcp math numobs educ potexp tenure married collbarg nonwhite 
i.year i.occcat i.ind1dg
    [aw=iweight], cluster(occ70) absorb(id);
test (sts=0) (finger=0) (ehf=0) (dcp=0) (math=0);


clear;
log close;
